package app.android.alampang.ui.activity;

import android.os.Bundle;
import android.os.Handler;

import app.android.alampang.R;
import app.android.alampang.loader.PlaceInfoLoader;
import app.android.alampang.ui.core.BaseActivity;
import app.android.alampang.utility.NavigationService;

public class SplashScreenActivity extends BaseActivity {

    private final int SPLASH_SCREEN_TIME_OUT = 2000;

    @Override
    public void onCreate(Bundle savedInstanceState, Bundle param)
    {
        setContentView(R.layout.activity_splash_screen);
        try {
            PlaceInfoLoader.load("info/placeInfo.xml", this);
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    NavigationService.getInstance().navigate(SplashScreenActivity.this, HomeActivity.class, true);
                }
            }, SPLASH_SCREEN_TIME_OUT);
        }
        catch (Exception e)
        {
            // Do something
        }
    }

    @Override
    public void initialize() {

    }

    @Override
    public void onLock() {

    }

    @Override
    public void onUnLock() {

    }

    @Override
    public void onReset() {

    }
}
